
<div class="container">
		<div id="index-nav-cates" style="width: 356px;float:left;text-align:center;" class="ui-widget">
			<?php 
				if(empty($top_category_id)) $top_category_id=0;
			echo $this->Section->getNavMenu('Category',
				array(
					'selectedid'=> $top_category_id,
					'ulAttributes'=>array('class'=>'nav'),
		                        'defaultClass'=>'ui-state-default',
					'sufli'=>'',
					'maxdepth' => 2,
				),$site_cate_id
			);
			?>
		</div>
		<div style="margin-left: 356px;">	
			{{template Elements/carousel_banner}}	
		</div>
</div>
<div class="container" style="margin-top:39px;">

	<ul class="nav nav-tabs" role="tablist">
	  <li class="active"><a href="#discount-products" role="tab" data-toggle="tab">{{__('促销产品')}}</a></li>
	  <li><a href="#latest_products" role="tab" data-toggle="tab">{{__('最新到货')}}</a></li>
	  <li><a href="#latest_products" role="tab" data-toggle="tab">{{__('热卖TOP5')}}</a></li>
	</ul>
	<div class="tab-content">
		<div class="tab-pane active" id="discount-products">
			<portlet portlet="carouFredSel" caroufredselid="discount-carou" title="" ulclass="carouFredSel-items small-padding"  recursive="-1" info="model=Product&limit=8&row=4&conditions[coverimg %3C%3E]=&list_tpl=products/_photolist&order=id desc">
				</portlet>
		</div>
		<div class="tab-pane active" id="latest_products">

		</div>
		<div class="tab-pane active" id="latest_products">
		</div>
	</div>
</div>

<div class="container">
	<div class="row">	
		<div class="ui-widget col-md-12">
				<portlet portlet="carouFredSel" caroufredselid="photo-carou" title="图片新闻" ulclass="carouFredSel-items small-padding"  recursive="-1" info="model=Article&limit=12&row=3&conditions[coverimg %3C%3E]=&list_tpl=regions/_photolist&order=id desc">
				</portlet>
		</div>
	</div>	
</div>
<!-- 
http://docs.dev7studios.com/jquery-plugins/caroufredsel
http://docs.dev7studios.com/jquery-plugins/caroufredsel-advanced
 -->
{{$this->Html->script(array(
            '/js/carouFredSel/jquery.carouFredSel-6.2.1.js',
        ));
}}
<script type="text/javascript">
var caroufredsel = function(){
	$(".carouFredSel-items",'#discount-products').carouFredSel({
		responsive	: true,
		items		: 4,//显示的数目
		scroll : {
            items           : 1, //每次滚动数量
            easing          : "swing",
            duration        : 1000,                         
            pauseOnHover    : true
        },
        prev: '#photo-carou-prev',
        next: '#photo-carou-next',
		height: 'auto',
	});

};
$(window).load(function () {
    //caroufredsel();
});
$(window).resize(function () {
    //caroufredsel();
});            

</script>